
Page({
  data: {
    auth: false
  },

  onLoad: function (options) {
    let _t = this;
    wx.getStorage({
      key: 'auth',
      success(res) {
        _t.setData({
          auth: res.data
        })
      }
    })
  },
  // 跳转聚焦文旅
  viewFocus(){
    wx.navigateTo({
      url: '../focusWen/summary'
    })
  },
  // 跳转专家热评
  viewForam(){
    wx.navigateTo({
      url: '../expertForum/expertForum',
    })
  },
  // 跳转商务咨询
  viewBuiness() {
    wx.navigateTo({
      url: '../business/business',
    })
  },
  // 跳转市州文旅
  viewBrigade() {
    wx.navigateTo({
      url: '../brigade/brigade',
    })
  },
  onGotUserInfo: function (e) {
    let userInfo = e.detail.userInfo;
    if (e.detail.errMsg == 'getUserInfo:ok') {
      wx.setStorage({
        key: 'userInfo',
        data: userInfo
      });
      this.setData({
        auth: true
      })
    }
   
    // console.log(e.detail.errMsg)
    // console.log(e.detail.userInfo)
    // console.log(e.detail.rawData)
  },
})